home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19950929-19951130 / 000371_news@columbia.edu_Mon Nov 13 20:10:36 1995.msg < prev    next >
Internet Message Format  |  2020-01-01  |  4KB

  1. Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA12900
  2.   (5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun>); Mon, 13 Nov 1995 15:10:57 -0500
  3. Received: (from news@localhost) by apakabar.cc.columbia.edu (8.6.12/8.6.12) id PAA19745 for kermit.misc@watsun; Mon, 13 Nov 1995 15:10:48 -0500
  4. Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
  5. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  6. Newsgroups: comp.protocols.kermit.misc
  7. Subject: Re: disable "disconnect" when exit from kermit
  8. Date: 13 Nov 1995 20:10:36 GMT
  9. Organization: Columbia University
  10. Lines: 66
  11. Message-Id: <4888ns$j8s@apakabar.cc.columbia.edu>
  12. References: <DHu494.9p5@scisun.sci.ccny.cuny.edu>
  13. Nntp-Posting-Host: watsun.cc.columbia.edu
  14. Apparently-To: kermit.misc@watsun.cc.columbia.edu
  15.  
  16. In article <DHu494.9p5@scisun.sci.ccny.cuny.edu>,
  17. Hua Deng <deng@scisun.sci.ccny.cuny.edu> wrote:
  18. : I am trying to add a callback feature through a modem on a sgi
  19. : (running irix5.3) and need a program which has the option not to
  20. : disconnect the establish serial port connection when exit from the
  21. : program.  
  22. :
  23. : On a HP workstaion, the command "ct" has the following option which
  24. : does the trick:
  25. :            -h             Prevent ct from disconnecting ("hanging up") the
  26. :                           current tty line.  This option is necessary if the
  27. :                           user is using a different tty line than the one
  28. :                           used by ct to spawn the getty.
  29. : Howerver, that command is not available on sgi and "cu" will disconnect
  30. : the line when exit, so does "kermit" under default settings.
  31. : Is there an option in kermit similar to the -h option for ct?
  32. :
  33. This is a specific instance of a Frequently Asked Question, namely
  34. "How Can I Exit from C-Kermit without Hanging up?"  This is just been added
  35. to our faq:
  36.  
  37.   http://www.columbia.edu/kermit/faq.html
  38.   ftp://kermit.columbia.edu/kermit/faq.txt
  39.  
  40. Here's the text:
  41.  
  42. Many people want to be able to make a dialout connection with UNIX
  43. C-Kermit, but then use some other software on the connection that C-Kermit
  44. made.  They quickly find that when they exit from C-Kermit, that the
  45. connection is gone before they can start the other application.
  46.  
  47. It is a fundamental property of UNIX that when a process exits, then every
  48. file that was opened by that process is automatically closed by UNIX.
  49. Closing a terminal device (such as a dialout tty device) hangs it up.
  50. There is nothing the process can do about it.
  51.  
  52. However, many workarounds are possible.  Here are just a few:
  53.  
  54.  . Read about the REDIRECT command in the ckcker.upd file.
  55.  
  56.  . Find out the file descriptor of the open device (it is given by
  57.    C-Kermit's \v(ttyfd) variable) and then run ("!") your other program
  58.    from the C-Kermit prompt, feeding it the file descriptor, e.g. through
  59.    shell redirection or a command line option (the method depends on the
  60.    other program, the capabilities of the shell, etc).
  61.  
  62.  . After Kermit makes the connection, type "show comm" to find out the
  63.    filename of the lock file.  Then suspend Kermit, then delete the lock
  64.    file, then start the other program and tell it to open the same tty
  65.    device.
  66.  
  67. (End quote)
  68.  
  69. However, if all you want to do is dial up another computer that will dial
  70. you back, there are easier ways to do it -- just write a Kermit script
  71. that makes the call, performs the dialog with the callback system, and
  72. then hangs up, and then waits to be called back.  The test version of
  73. C-Kermit, 5A(192), which you can find on kermit.columbia.edu in the
  74. kermit/test tree, has a new ANSWER command to make the second part easy.
  75. Without it, however, it's still pretty easy -- after hanging up,
  76. "output ats0=1\13" to the modem and then wait for CONNECT (assuming the
  77. modem is Hayes compatible).
  78.  
  79. - Frank